package com.ruoyi.user.utils;

import java.math.BigDecimal;

/**
 * @author houyong
 */
public class PayChannel {


    public static final BigDecimal RATE = new BigDecimal("0.006");


    //1-收入类型 0-支出
    public enum Transaction {
        /**
         * 支出
         */
        pey(0),
        /**
         * 收入
         */
        income(1);
        private Integer value;

        Transaction(Integer value) {
            this.setValue(value);
        }

        public Integer getValue() {
            return value;
        }

        public void setValue(Integer value) {
            this.value = value;
        }
    }


    /**
     * PAYSUCCESS(2) 支付成功
     * REFUNDSUCCESS(-1) 退款成功
     * PARTIALREFUNDSUCCESS(-2) 部分退款成功
     * NOTPAY(1) 未支付
     */
    public enum TransactionStatus {
        PAYSUCCESS(2), REFUNDSUCCESS(-1), PARTIALREFUNDSUCCESS(-2), NOTPAY(1);
        private Integer value;

        TransactionStatus(Integer value) {
            this.setValue(value);
        }

        public Integer getValue() {
            return value;
        }

        public void setValue(Integer value) {
            this.value = value;
        }
    }


    //成功,处理中,失败
    public enum RefundStatus {
        SUCCEEDED("succeeded"), PENDING("pending"), FAILED("failed");
        private String value;

        RefundStatus(String value) {
            this.setValue(value);
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }


    public enum ChannelType {
        ALIPAY("alipay"),
        WX("wx");
        private String value;

        ChannelType(String value) {
            this.setValue(value);
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }

}
